﻿using Microsoft.AspNetCore.Mvc;
using WebApiThird.Entity;
using WebApiThird.Model;

namespace WebApiThird.IService
{
    public interface IStudentService
    {
        Task<bool> Add(StudentReq req);

        Task<StudentRes?> GetStudent(int id);

        Task<List<Student>?> GetStudents(int id);

        /// <summary>
        /// 封装内存缓存使用
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<StudentRes?> GetStudentExt(int id);


        /// <summary>
        ///  分布式缓存
        /// </summary>
        /// <returns></returns>
        Task<List<Student>?> GetStudentsExt(int id);
    }
}
